

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Real-space covariance representation of atomic environments &mdash; quippy 7ea04c5+ documentation</title>
  

  
  
    <link rel="shortcut icon" href="_static/favicon.ico"/>
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script type="text/javascript" src="_static/jquery.js"></script>
        <script type="text/javascript" src="_static/underscore.js"></script>
        <script type="text/javascript" src="_static/doctools.js"></script>
        <script type="text/javascript" src="_static/language_data.js"></script>
        <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"processClass": "math|output_area", "processEscapes": true, "ignoreClass": "document", "inlineMath": [["$", "$"], ["\\(", "\\)"]]}})</script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/theme_overrides.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="prev" title="Identification of atoms on surfaces" href="find_surface_atoms.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home"> quippy
          

          
            
            <img src="_static/hybrid.png" class="logo" alt="Logo"/>
          
          </a>

          
            
            
              <div class="version">
                7ea04c5+
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
    
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to <code class="docutils literal notranslate"><span class="pre">quippy</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation of QUIP and quippy</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorials/index.html">Tutorials</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="quippy.html">Quippy library reference</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quippy.html#core-functionality">Core functionality</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="quippy.html#structure-generation-manipulation-and-analysis">Structure generation, manipulation and analysis</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="structures.html">Structure building routines</a></li>
<li class="toctree-l3"><a class="reference internal" href="descriptors.html">Descriptors for atomic environments</a></li>
<li class="toctree-l3"><a class="reference internal" href="crack.html">Tools for fracture simulations</a></li>
<li class="toctree-l3"><a class="reference internal" href="clusters.html">Cluster carving routines</a></li>
<li class="toctree-l3"><a class="reference internal" href="find_surface_atoms.html">Identification of atoms on surfaces</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">Real-space covariance representation of atomic environments</a><ul class="simple">
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="topology.html">Some utilities for topological analysis</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#molecular-dynamics">Molecular Dynamics</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#additional-tools-for-potentials">Additional tools for Potentials</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#mathematical-and-optimisation-tools">Mathematical and optimisation tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#units-data-and-constants">Units, Data and Constants</a></li>
<li class="toctree-l2"><a class="reference internal" href="quippy.html#low-level-routines-and-datatypes">Low level routines and datatypes</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="visualisation.html">Visualisation Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="fortran_wrapper.html">Appendix: wrapping Fortran 90 Code</a></li>
<li class="toctree-l1"><a class="reference internal" href="teach_sparse.html">Command line options of the teach_sparse main program</a></li>
</ul>

            
          
    <p></p>
    <ul>
        <li><a href="genindex.html">Index</a></li>
        <li><a href="py-modindex.html">Module Index</a></li>
        <li><a href="search.html">Search Page</a></li>
        <li><a href="_modules/index.html">Module Source Code</a></li>
    </ul>
  
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">quippy</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
          <li><a href="quippy.html">Quippy library reference</a> &raquo;</li>
        
      <li>Real-space covariance representation of atomic environments</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/real_space_covariance.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  
<style>
/* CSS overrides for sphinx_rtd_theme */

/* 24px margin */
.nbinput.nblast,
.nboutput.nblast {
    margin-bottom: 19px;  /* padding has already 5px */
}

/* ... except between code cells! */
.nblast + .nbinput {
    margin-top: -19px;
}

.admonition > p:before {
    margin-right: 4px;  /* make room for the exclamation icon */
}

/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
.math {
    text-align: unset;
}
</style>
<div class="section" id="module-quippy.real_space_covariance">
<span id="real-space-covariance-representation-of-atomic-environments"></span><h1>Real-space covariance representation of atomic environments<a class="headerlink" href="#module-quippy.real_space_covariance" title="Permalink to this headline">¶</a></h1>
<p>Module contents for <a class="reference internal" href="#module-quippy.real_space_covariance" title="quippy.real_space_covariance: Representation of atomic environments"><code class="xref py py-mod docutils literal notranslate"><span class="pre">quippy.real_space_covariance</span></code></a>:</p>
<p class="rubric">Classes</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.real_space_covariance.RealSpaceCovariance" title="quippy.real_space_covariance.RealSpaceCovariance"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RealSpaceCovariance</span></code></a>(…)</td>
<td>24-point quaternion grid from centers of the cells of a truncated-cubic tetracontaoctachoron (48-cell), coverage angle alpha=62.8 degrees.</td>
</tr>
</tbody>
</table>
<p class="rubric">Functions</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.real_space_covariance.random_quaternion" title="quippy.real_space_covariance.random_quaternion"><code class="xref py py-obj docutils literal notranslate"><span class="pre">random_quaternion</span></code></a>()</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.real_space_covariance.overlap_func" title="quippy.real_space_covariance.overlap_func"><code class="xref py py-obj docutils literal notranslate"><span class="pre">overlap_func</span></code></a>(x,[am_data])</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.real_space_covariance.centre_on_atom_1" title="quippy.real_space_covariance.centre_on_atom_1"><code class="xref py py-obj docutils literal notranslate"><span class="pre">centre_on_atom_1</span></code></a>(at)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.real_space_covariance.doverlap_func" title="quippy.real_space_covariance.doverlap_func"><code class="xref py py-obj docutils literal notranslate"><span class="pre">doverlap_func</span></code></a>(x,[am_data])</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.real_space_covariance.rotmat_quaternion" title="quippy.real_space_covariance.rotmat_quaternion"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rotmat_quaternion</span></code></a>(q)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.real_space_covariance.drotmat_dquaternion" title="quippy.real_space_covariance.drotmat_dquaternion"><code class="xref py py-obj docutils literal notranslate"><span class="pre">drotmat_dquaternion</span></code></a>(q)</td>
<td><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<dl class="class">
<dt id="quippy.real_space_covariance.RealSpaceCovariance">
<em class="property">class </em><code class="descclassname">quippy.real_space_covariance.</code><code class="descname">RealSpaceCovariance</code><span class="sig-paren">(</span><em>n</em>, <em>n_grid_minim</em>, <em>sigma_alpha</em>, <em>sigma_beta</em>, <em>sigma_covariance</em>, <em>sigma_error</em>, <em>cutoff_in</em>, <em>transition_width</em>, <em>covariance_tol</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.RealSpaceCovariance" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="oo_fortran.html#quippy.oo_fortran.FortranDerivedType" title="quippy.oo_fortran.FortranDerivedType"><code class="xref py py-class docutils literal notranslate"><span class="pre">quippy.oo_fortran.FortranDerivedType</span></code></a></p>
<p>24-point quaternion grid from centers of the cells of a
truncated-cubic tetracontaoctachoron (48-cell), coverage angle
alpha=62.8 degrees. See <a class="reference external" href="http://charles.karney.info/orientation">http://charles.karney.info/orientation</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>n</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>n_grid_minim</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>sigma_alpha</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>sigma_beta</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>sigma_covariance</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>sigma_error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>cutoff_in</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>transition_width</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
<dt><strong>covariance_tol</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">__init__initialise</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.
Class is wrapper around Fortran type <code class="docutils literal notranslate"><span class="pre">RealSpaceCovariance</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#quippy.real_space_covariance.RealSpaceCovariance.align" title="quippy.real_space_covariance.RealSpaceCovariance.align"><code class="xref py py-obj docutils literal notranslate"><span class="pre">align</span></code></a>(*args,&nbsp;**kwargs)</td>
<td>Wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">align</span></code> containing multiple routines:</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.real_space_covariance.RealSpaceCovariance.covariance" title="quippy.real_space_covariance.RealSpaceCovariance.covariance"><code class="xref py py-obj docutils literal notranslate"><span class="pre">covariance</span></code></a>(…)</td>
<td>realspacecovariance_covariance(at1,at2,q,[distance,force_covariance,force_difference,do_align])</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_same_fortran_object</span></code>(other)</td>
<td>Test if <cite>self</cite> and <cite>other</cite> point to the same Fortan object.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.real_space_covariance.RealSpaceCovariance.predict" title="quippy.real_space_covariance.RealSpaceCovariance.predict"><code class="xref py py-obj docutils literal notranslate"><span class="pre">predict</span></code></a>(test)</td>
<td>realspacecovariance_predict(test)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.real_space_covariance.RealSpaceCovariance.predict_2" title="quippy.real_space_covariance.RealSpaceCovariance.predict_2"><code class="xref py py-obj docutils literal notranslate"><span class="pre">predict_2</span></code></a>(test)</td>
<td>realspacecovariance_predict_2(test)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.real_space_covariance.RealSpaceCovariance.predict_3" title="quippy.real_space_covariance.RealSpaceCovariance.predict_3"><code class="xref py py-obj docutils literal notranslate"><span class="pre">predict_3</span></code></a>(test,crystal,k)</td>
<td>realspacecovariance_predict_3(test,crystal,k)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#quippy.real_space_covariance.RealSpaceCovariance.set_n" title="quippy.real_space_covariance.RealSpaceCovariance.set_n"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_n</span></code></a>(n)</td>
<td>realspacecovariance_set_n(n)</td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal notranslate"><span class="pre">shallow_copy</span></code>()</td>
<td>Return a shallow copy of <cite>self</cite>.</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal notranslate"><span class="pre">shallow_copy_from</span></code>(other)</td>
<td>Transform <cite>self</cite> into a shallow copy of <cite>other</cite>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#quippy.real_space_covariance.RealSpaceCovariance.teach" title="quippy.real_space_covariance.RealSpaceCovariance.teach"><code class="xref py py-obj docutils literal notranslate"><span class="pre">teach</span></code></a>(do_optimise,use_qr)</td>
<td>realspacecovariance_teach(do_optimise,use_qr)</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="quippy.real_space_covariance.RealSpaceCovariance.align">
<code class="descname">align</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.RealSpaceCovariance.align" title="Permalink to this definition">¶</a></dt>
<dd><p>Wrapper around Fortran interface <code class="docutils literal notranslate"><span class="pre">align</span></code> containing multiple routines:</p>
<blockquote>
<div><dl class="function">
<dt>
<code class="descname">align</code><span class="sig-paren">(</span><em>tag1</em>, <em>tag2</em>, <em>qs</em><span class="optional">[</span>, <em>overlap</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
<dd><p>Align two sets of configurations, identified by the tags <code class="docutils literal notranslate"><span class="pre">tag1</span></code> and <code class="docutils literal notranslate"><span class="pre">tag2</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>tag1</strong> (<em>input int</em>) – </li>
<li><strong>tag2</strong> (<em>input int</em>) – </li>
<li><strong>qs</strong> (<em>input rank-2 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n0</em><em>,</em><em>qp_n1</em><em>)</em>) – </li>
<li><strong>overlap</strong> (<em>in/output rank-0 array</em><em>(</em><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><em>float</em></a><em>,</em><em>'d'</em><em>)</em><em>, </em><em>optional</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>ret_q</strong> –  rank-1 array(‘d’) with bounds (4)</p>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">realspacecovariance_align_data_sets</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt>
<code class="descname">align</code><span class="sig-paren">(</span><em>at1</em>, <em>at2</em>, <em>qs</em><span class="optional">[</span>, <em>overlap</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
<dd><p>Find the quaterion corresponding to the rotation which maximise the overlap
between the atomic densities of at1 and at2, starting minimisations at each
quaterion in the (4,n) array qs</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>at1</strong> (<a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object) – </li>
<li><strong>at2</strong> (<a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object) – </li>
<li><strong>qs</strong> (<em>input rank-2 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n0</em><em>,</em><em>qp_n1</em><em>)</em>) – </li>
<li><strong>overlap</strong> (<em>in/output rank-0 array</em><em>(</em><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><em>float</em></a><em>,</em><em>'d'</em><em>)</em><em>, </em><em>optional</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>ret_q</strong> –  rank-1 array(‘d’) with bounds (4)</p>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">realspacecovariance_align_pair</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt>
<code class="descname">align</code><span class="sig-paren">(</span><em>at</em>, <em>tag</em>, <em>qs</em><span class="optional">[</span>, <em>overlap</em><span class="optional">]</span><span class="sig-paren">)</span></dt>
<dd><p>Align the configuration <code class="docutils literal notranslate"><span class="pre">at</span></code> with the set of configurations in <code class="docutils literal notranslate"><span class="pre">this.data</span></code>
which have tag equal to <code class="docutils literal notranslate"><span class="pre">tag</span></code>. Objective function is sum of overlaps.
A single minimisation is performed, starting from quaterions in <code class="docutils literal notranslate"><span class="pre">qs</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>at</strong> (<a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object) – </li>
<li><strong>tag</strong> (<em>input int</em>) – </li>
<li><strong>qs</strong> (<em>input rank-2 array</em><em>(</em><em>'d'</em><em>) </em><em>with bounds</em><em> (</em><em>qp_n0</em><em>,</em><em>qp_n1</em><em>)</em>) – </li>
<li><strong>overlap</strong> (<em>in/output rank-0 array</em><em>(</em><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><em>float</em></a><em>,</em><em>'d'</em><em>)</em><em>, </em><em>optional</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>ret_q</strong> –  rank-1 array(‘d’) with bounds (4)</p>
</td>
</tr>
</tbody>
</table>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">realspacecovariance_align_with_data_set</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

</div></blockquote>
</dd></dl>

<dl class="method">
<dt id="quippy.real_space_covariance.RealSpaceCovariance.covariance">
<code class="descname">covariance</code><span class="sig-paren">(</span><em>at1</em>, <em>at2</em>, <em>q</em><span class="optional">[</span>, <em>distance</em>, <em>force_covariance</em>, <em>force_difference</em>, <em>do_align</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.RealSpaceCovariance.covariance" title="Permalink to this definition">¶</a></dt>
<dd><p>realspacecovariance_covariance(at1,at2,q,[distance,force_covariance,force_difference,do_align])</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>at1</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>at2</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>q</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-1 array(‘d’) with bounds (4)</span></dt>
<dd></dd>
<dt><strong>distance</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(float,’d’), optional</span></dt>
<dd></dd>
<dt><strong>force_covariance</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(float,’d’), optional</span></dt>
<dd></dd>
<dt><strong>force_difference</strong> <span class="classifier-delimiter">:</span> <span class="classifier">in/output rank-0 array(float,’d’), optional</span></dt>
<dd></dd>
<dt><strong>do_align</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int, optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_covariance</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">covariance</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.real_space_covariance.RealSpaceCovariance.predict">
<code class="descname">predict</code><span class="sig-paren">(</span><em>test</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.RealSpaceCovariance.predict" title="Permalink to this definition">¶</a></dt>
<dd><p>realspacecovariance_predict(test)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>test</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>force</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">predict</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.real_space_covariance.RealSpaceCovariance.predict_2">
<code class="descname">predict_2</code><span class="sig-paren">(</span><em>test</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.RealSpaceCovariance.predict_2" title="Permalink to this definition">¶</a></dt>
<dd><p>realspacecovariance_predict_2(test)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>test</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>force</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">predict_2</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.real_space_covariance.RealSpaceCovariance.predict_3">
<code class="descname">predict_3</code><span class="sig-paren">(</span><em>test</em>, <em>crystal</em>, <em>k</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.RealSpaceCovariance.predict_3" title="Permalink to this definition">¶</a></dt>
<dd><p>realspacecovariance_predict_3(test,crystal,k)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>test</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>crystal</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
<dt><strong>k</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>force</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-1 array(‘d’) with bounds (3)</span></dt>
<dd></dd>
<dt><strong>error</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">predict_3</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.real_space_covariance.RealSpaceCovariance.set_n">
<code class="descname">set_n</code><span class="sig-paren">(</span><em>n</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.RealSpaceCovariance.set_n" title="Permalink to this definition">¶</a></dt>
<dd><p>realspacecovariance_set_n(n)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>n</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">set_n</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

<dl class="method">
<dt id="quippy.real_space_covariance.RealSpaceCovariance.teach">
<code class="descname">teach</code><span class="sig-paren">(</span><em>do_optimise</em>, <em>use_qr</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.RealSpaceCovariance.teach" title="Permalink to this definition">¶</a></dt>
<dd><p>realspacecovariance_teach(do_optimise,use_qr)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>do_optimise</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
<dt><strong>use_qr</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input int</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">teach</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="quippy.real_space_covariance.random_quaternion">
<code class="descclassname">quippy.real_space_covariance.</code><code class="descname">random_quaternion</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.random_quaternion" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_random_quaternion</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-1 array(‘d’) with bounds (4)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">random_quaternion</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.real_space_covariance.overlap_func">
<code class="descclassname">quippy.real_space_covariance.</code><code class="descname">overlap_func</code><span class="sig-paren">(</span><em>x</em><span class="optional">[</span>, <em>am_data</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.overlap_func" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>x</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (qp_n0)</span></dt>
<dd></dd>
<dt><strong>am_data</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘S’) with bounds (qp_n1,(1)), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_overlap_func</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">overlap_func</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.real_space_covariance.centre_on_atom_1">
<code class="descclassname">quippy.real_space_covariance.</code><code class="descname">centre_on_atom_1</code><span class="sig-paren">(</span><em>at</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.centre_on_atom_1" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>at</strong> <span class="classifier-delimiter">:</span> <span class="classifier"><a class="reference internal" href="atoms.html#quippy.atoms.Atoms" title="quippy.atoms.Atoms"><code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code></a> object</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">centre_on_atom_1</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.real_space_covariance.doverlap_func">
<code class="descclassname">quippy.real_space_covariance.</code><code class="descname">doverlap_func</code><span class="sig-paren">(</span><em>x</em><span class="optional">[</span>, <em>am_data</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.doverlap_func" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>x</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (qp_n0)</span></dt>
<dd></dd>
<dt><strong>am_data</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-2 array(‘S’) with bounds (qp_n1,(1)), optional</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_doverlap_func</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-1 array(‘d’) with bounds (size(qp_x))</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">doverlap_func</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.real_space_covariance.rotmat_quaternion">
<code class="descclassname">quippy.real_space_covariance.</code><code class="descname">rotmat_quaternion</code><span class="sig-paren">(</span><em>q</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.rotmat_quaternion" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>q</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (4)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_rotmat_quaternion</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-2 array(‘d’) with bounds (3,3)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">rotmat_quaternion</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

<dl class="function">
<dt id="quippy.real_space_covariance.drotmat_dquaternion">
<code class="descclassname">quippy.real_space_covariance.</code><code class="descname">drotmat_dquaternion</code><span class="sig-paren">(</span><em>q</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.real_space_covariance.drotmat_dquaternion" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first docutils">
<dt><strong>q</strong> <span class="classifier-delimiter">:</span> <span class="classifier">input rank-1 array(‘d’) with bounds (4)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>ret_drotmat_dquaternion</strong> <span class="classifier-delimiter">:</span> <span class="classifier">rank-3 array(‘d’) with bounds (3,3,4)</span></dt>
<dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">drotmat_dquaternion</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/Utils/real_space_covariance.f95">src/Utils/real_space_covariance.f95</a>.</p>
</dd></dl>

</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
      
        <a href="find_surface_atoms.html" class="btn btn-neutral float-left" title="Identification of atoms on surfaces" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2008-2016, James Kermode

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>